export { }

// 1. 给对象添加类型
interface Person {
    name: string
    age: number
    isMarry: boolean
}
const p1: Person = {
    name: '张三',
    age: 18,
    isMarry: false
}

// 2. 给接口返回数据做类型
interface NoticeData {
    notice: string
    createTime: string
}

interface Response {
    success: boolean
    code: number
    data: NoticeData
    message: string
}

const res: Response = {
    success: true,
    code: 10000,
    data: {
        notice: '我是最幸运的',
        createTime: '2025-2-10'
    },
    message: '幸运加倍'
}